package com.example.statemachine.machine.enums;

/**
 * @author jianwei.wang
 * @version v1.0
 * @date 2019/5/8 18:06
 * 状态操作枚举
 **/
public enum  EnumFsmEvent {

    //暂存
    TEMP_STORAGE,
    //提交
    SUBMIT,
    //撤回
    WITH_DRAW,
    //审核
    REVIEW,
    //反审核
    ANTI_REVIEW,
    //作废
    CANCEL;

    public static EnumFsmEvent getFsmEvent(int event) {
        for (EnumFsmEvent fsmEvent : EnumFsmEvent.values()) {
            if (fsmEvent.ordinal() == event){
                return fsmEvent;
            }
        }
        return null;
    }
}
